/********************************************************************************
物理层
*******************************************************************************/
#ifndef __AS12127_USART_H__
#define __AS12127_USART_H__

#include "includes.h"
#include "initialise.h"
#include "OS_Help.h"
#include "ReleaseCfg.h"

#include "misc.h"//NVIC
#include "stm32f10x_rcc.h"
#include "stm32f10x_gpio.h"
#include "stm32f10x_usart.h"
#define SYSTEM_SUPPORT_OS  1

typedef struct _usart
{
	USART_TypeDef *Usart;
	GPIO_TypeDef* GPIOTx; 
	GPIO_TypeDef* GPIORx; 
	uint16_t GPIOTx_Pin;
	uint16_t GPIORx_Pin;
	u32 bound;
  u16 RX_STA;       //接收状态标记:bit15--接收完成标志,bit14--接收到0x0d,bit13~0--接收到的有效字节数目
	u8 RX_Buf[58];
} common_usart;
	//接收状态






void drv_uart_init(void);
void drv_uart_tx_bytes( uint8_t* TxBuffer, uint8_t Length );

#endif



